fix: UI #32
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: Deploy static content to Pages | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: main | |
- name: Get next version | |
id: get_next_version | |
uses: thenativeweb/get-next-version@main | |
- name: Create New Release | |
if: ${{ steps.get_next_version.outputs.hasNextVersion == 'true' }} | |
run: | | |
NEXT_VERSION=${{ steps.get_next_version.outputs.version }} | |
git tag $NEXT_VERSION | |
git push origin $NEXT_VERSION | |
build-deploy: | |
name: Build and Deploy | |
needs: release | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: "18.x" | |
- run: npm install | |
- run: npm run build | |
- name: Deploy | |
uses: crazy-max/[email protected] | |
with: | |
target_branch: gh-pages | |
build_dir: build | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |