Skip to content

Commit

Permalink
chore: update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
openoms committed Jul 1, 2024
1 parent 234cedb commit 15d8567
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Spell Check Repo
uses: crate-ci/typos@master
with:
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/update-admin-api-reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: Checkout GaloyMoney/blink repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: 'GaloyMoney/blink'
path: 'blink'
Expand Down Expand Up @@ -42,7 +44,7 @@ jobs:
- name: Checkout dev.blink.sv repo
if: env.CURRENT_HASH != env.WEEK_OLD_HASH
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: 'GaloyMoney/dev.blink.sv'
path: 'dev.blink.sv'
Expand All @@ -53,15 +55,15 @@ jobs:
if: env.CURRENT_HASH != env.WEEK_OLD_HASH
run: |
# deps
yarn add spectaql --non-interactive
nix-shell -p yarn --run "yarn add spectaql --non-interactive"
# checkout blink
cd blink
git checkout ${{ env.CURRENT_COMMIT_HASH }}
# build admin api reference
npx spectaql ../dev.blink.sv/scripts/spectaql/spectaql-config-admin-api.yml \
-t ../dev.blink.sv/static -f admin-api-reference.html
nix-shell -p yarn --run "npx spectaql ../dev.blink.sv/scripts/spectaql/spectaql-config-admin-api.yml \
-t ../dev.blink.sv/static -f admin-api-reference.html"
# set dark mode
sed -i 's/spectaql.min.css/spectaql.dark.css/' ../dev.blink.sv/static/admin-api-reference.html
Expand All @@ -75,16 +77,16 @@ jobs:
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
if: env.CURRENT_HASH != env.WEEK_OLD_HASH
run: nix-shell -p yarn --run "yarn install --frozen-lockfile"

- name: Build
if: env.CURRENT_HASH != env.WEEK_OLD_HASH
run: nix-shell -p yarn --run "yarn build"

- name: Deploy to GitHub Pages
if: env.CURRENT_HASH != env.WEEK_OLD_HASH
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/update-public-api-reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: Checkout GaloyMoney/blink repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: 'GaloyMoney/blink'
path: 'blink'
Expand Down Expand Up @@ -42,26 +44,25 @@ jobs:
- name: Checkout dev.blink.sv repo
if: env.CURRENT_HASH != env.WEEK_OLD_HASH
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: 'GaloyMoney/dev.blink.sv'
path: 'dev.blink.sv'
ref: 'main'
fetch-depth: 0

- name: Build and update the API reference
if: env.CURRENT_HASH != env.WEEK_OLD_HASH
run: |
# deps
yarn add spectaql --non-interactive
nix-shell -p yarn --run "yarn add spectaql --non-interactive"
# checkout blink
cd blink
git checkout ${{ env.CURRENT_COMMIT_HASH }}
# build public api reference
npx spectaql ../dev.blink.sv/scripts/spectaql/spectaql-config-public-api.yml \
-t ../dev.blink.sv/static -f public-api-reference.html
nix-shell -p yarn --run "npx spectaql ../dev.blink.sv/scripts/spectaql/spectaql-config-public-api.yml \
-t ../dev.blink.sv/static -f public-api-reference.html"
# set dark mode
sed -i 's/spectaql.min.css/spectaql.dark.css/' ../dev.blink.sv/static/public-api-reference.html
Expand All @@ -75,12 +76,13 @@ jobs:
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: List
run: ls -la ./

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

- name: List
run: ls -la ./
- name: Build
run: nix-shell -p yarn --run "yarn build"

Expand Down

0 comments on commit 15d8567

Please sign in to comment.