Thanks to visit codestin.com
Credit goes to github.com

Skip to content

deploy

deploy #40733

name: Deploy to github pages
on:
repository_dispatch:
types: deploy
workflow_dispatch:
push:
branches:
- master
- staging
concurrency: site-deploy-lock
jobs:
gh-pages-deploy:
name: Deploying to gh-pages
runs-on: ubuntu-latest
steps:
- name: Setup Node.js for use with actions
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Checkout branch
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: '3.13.3'
- name: Set up rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: '1.86.0'
- name: Checkout site repo
uses: actions/checkout@v3
with:
repository: "quacs/site"
ref: "master"
path: "site/gh-pages-site"
token: ${{ secrets.QUACS_TOKEN }}
- name: Clean install dependencies
working-directory: ./site
run: yarn install --frozen-lockfile
- name: Install wasm-pack
working-directory: ./site
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Run deploy script
working-directory: ./site
env:
BUILD_ARGS: ${{ github.event.client_payload.build_args }}
run: |
git -C gh-pages-site config user.name "QuACS" && git -C gh-pages-site config user.email "[email protected]"
yarn gh-pages-deploy
update-meta:
name: Update meta
runs-on: ubuntu-latest
needs: [gh-pages-deploy]
permissions:
contents: write
steps:
- name: Checkout meta branch
uses: actions/checkout@v4
with:
ref: meta
- name: Update meta.json
run: |
echo -n \{\"last_deployed\":\"$(date --iso-8601=seconds -u)\"\} > meta.json
- name: Push meta.json
run: |
git config user.name "QuACS" && git config user.email "[email protected]"
git add meta.json
git commit -m "$(date)" || exit 0
git push