From 15d8567c85fb653412cf2adf628b4d128b019f4c Mon Sep 17 00:00:00 2001 From: openoms Date: Mon, 1 Jul 2024 10:49:40 +0200 Subject: [PATCH] chore: update actions --- .github/workflows/spelling.yml | 2 +- .../workflows/update-admin-api-reference.yml | 18 +++++++++-------- .../workflows/update-public-api-reference.yml | 20 ++++++++++--------- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml index 168c6d21..729934be 100644 --- a/.github/workflows/spelling.yml +++ b/.github/workflows/spelling.yml @@ -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: diff --git a/.github/workflows/update-admin-api-reference.yml b/.github/workflows/update-admin-api-reference.yml index 075613ab..1cebd090 100644 --- a/.github/workflows/update-admin-api-reference.yml +++ b/.github/workflows/update-admin-api-reference.yml @@ -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' @@ -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' @@ -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 @@ -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 }} diff --git a/.github/workflows/update-public-api-reference.yml b/.github/workflows/update-public-api-reference.yml index ce411962..23b65c9c 100644 --- a/.github/workflows/update-public-api-reference.yml +++ b/.github/workflows/update-public-api-reference.yml @@ -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' @@ -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' @@ -50,18 +52,17 @@ jobs: 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 @@ -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"