Update docs #6
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: Build and push to static branch | |
on: | |
push: | |
branches: [ 'master' ] | |
paths-ignore: | |
- '.github/workflows/release.yml' | |
workflow_dispatch: | |
concurrency: | |
group: 'build' | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: 'Build' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ./dist | |
name: dist | |
push-static: | |
name: 'Push to static branch' | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- name: Push to static branch | |
env: | |
TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TARGET_BRANCH: 'static' | |
run: npm run push-static | |
update-latest: | |
name: 'Update the latest release' | |
runs-on: ubuntu-latest | |
needs: push-static | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: 'static' | |
- name: Update the latest tag | |
run: | | |
git tag -f latest | |
git push origin latest --force |