Fixing release script (#641) (#642) #50
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub Pages | |
on: | |
push: | |
tags: | |
- '*.*.*' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node 18.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18.18.2 | |
- name: set env | |
run: | | |
export NODE_OPTIONS=--openssl-legacy-provider | |
- name: install dependency | |
run: npm install | |
- name: Run Build | |
run: | | |
npm run build | |
- name: Deploy to GitHub Pages | |
if: | | |
!contains(github.ref, 'rc') && | |
!contains(github.ref, 'RC') && | |
!contains(github.ref, 'alpha') && | |
!contains(github.ref, 'M') && | |
!contains(github.ref, 'beta') | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: build # Replace "dist" with the output directory of your build | |
release: | |
needs: deploy | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false |