v0.2.37 Release #26
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
# website-update-api-reference.yml | |
name: Website update API reference | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
update-api-reference-and-website-demo-files: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: DeterminateSystems/nix-installer-action@v12 | |
- uses: DeterminateSystems/magic-nix-cache-action@v7 | |
- uses: actions/checkout@v4 | |
- name: Build the API reference | |
run: | | |
cd website | |
npm install spectaql | |
npx spectaql spectaql-config.yml -t static -f api-reference.html | |
- name: Generate the website demo files | |
run: nix develop -c make e2e | |
- name: Commit the API reference and website demo changes | |
run: | | |
git config --local user.name 'github-actions[bot]' | |
git config --local user.email 'github-actions[bot]@users.noreply.github.com' | |
git add website/static | |
git commit -m "docs: api reference and website examples update to $GITHUB_SHA" | |
git reset --hard | |
git pull --rebase origin main | |
git push origin HEAD:main | |
- name: Install Website Dependencies | |
run: | | |
cd website | |
nix-shell -p yarn --run "yarn install --frozen-lockfile" | |
- name: Build Website | |
run: | | |
cd website | |
nix-shell -p yarn --run "yarn build" | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./website/build | |
user_name: github-actions[bot] | |
user_email: 41898282+github-actions[bot]@users.noreply.github.com |