Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: nix in actions, deploy website after API reference update #89

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ on:
push:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
workflow_dispatch:

jobs:
deploy:
Expand All @@ -14,16 +13,15 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: yarn
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7
- uses: actions/checkout@v4

- name: Install Dependencies
run: nix-shell -p yarn --run "yarn install --frozen-lockfile"

- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build website
run: yarn build
- name: Build
run: nix-shell -p yarn --run "yarn build"

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
Expand Down
21 changes: 9 additions & 12 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,18 @@ on:
pull_request:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

jobs:
test-deploy:
name: Test deployment
name: Test Deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: yarn
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7
- uses: actions/checkout@v4

- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Test build website
run: yarn build
- name: Install Dependencies
run: nix-shell -p yarn --run "yarn install --frozen-lockfile"

- name: Test Build
run: nix-shell -p yarn --run "yarn build"
17 changes: 17 additions & 0 deletions .github/workflows/update-admin-api-reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,20 @@ jobs:
short_commit_hash=$(echo ${{ env.CURRENT_COMMIT_HASH }} | cut -c 1-7)
git commit -m "docs: admin api reference update to blink commit $short_commit_hash"
git push origin main

- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7

- name: Install Dependencies
run: nix-shell -p yarn --run "yarn install --frozen-lockfile"

- name: Build
run: 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: ./build
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
17 changes: 17 additions & 0 deletions .github/workflows/update-public-api-reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,20 @@ jobs:
short_commit_hash=$(echo ${{ env.CURRENT_COMMIT_HASH }} | cut -c1-7)
git commit -m "docs: public api reference update to blink commit $short_commit_hash"
git push origin main

- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7

- name: Install Dependencies
run: nix-shell -p yarn --run "yarn install --frozen-lockfile"

- name: Build
run: 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: ./build
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
Loading