From af2532d258d4d0d2a66fd74fcf711b432d4568f2 Mon Sep 17 00:00:00 2001 From: Hamir Mahal Date: Tue, 15 Oct 2024 16:35:22 -0700 Subject: [PATCH 1/2] chore: changes from formatting on save --- .github/workflows/book-cd.yml | 58 +++++++++++++++++------------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/book-cd.yml b/.github/workflows/book-cd.yml index e8149e3832..fb38704494 100644 --- a/.github/workflows/book-cd.yml +++ b/.github/workflows/book-cd.yml @@ -8,33 +8,33 @@ jobs: deploy: runs-on: ubuntu-latest permissions: - contents: write # To push a branch - pull-requests: write # To create a PR from that branch + contents: write # To push a branch + pull-requests: write # To create a PR from that branch steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Install latest mdbook - run: | - tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name') - url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz" - mkdir mdbook - curl -sSL $url | tar -xz --directory=./mdbook - echo `pwd`/mdbook >> $GITHUB_PATH - - name: Deploy GitHub Pages - run: | - # This assumes your book is in the root of your repository. - # Just add a `cd` here if you need to change to another directory. - cd candle-book - mdbook build - git worktree add gh-pages - git config user.name "Deploy from CI" - git config user.email "" - cd gh-pages - # Delete the ref to avoid keeping history. - git update-ref -d refs/heads/gh-pages - rm -rf * - mv ../book/* . - git add . - git commit -m "Deploy $GITHUB_SHA to gh-pages" - git push --force --set-upstream origin gh-pages + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Install latest mdbook + run: | + tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name') + url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz" + mkdir mdbook + curl -sSL $url | tar -xz --directory=./mdbook + echo `pwd`/mdbook >> $GITHUB_PATH + - name: Deploy GitHub Pages + run: | + # This assumes your book is in the root of your repository. + # Just add a `cd` here if you need to change to another directory. + cd candle-book + mdbook build + git worktree add gh-pages + git config user.name "Deploy from CI" + git config user.email "" + cd gh-pages + # Delete the ref to avoid keeping history. + git update-ref -d refs/heads/gh-pages + rm -rf * + mv ../book/* . + git add . + git commit -m "Deploy $GITHUB_SHA to gh-pages" + git push --force --set-upstream origin gh-pages From c4dc8237408d2f4c33a7690f793cc0272eac4f7c Mon Sep 17 00:00:00 2001 From: Hamir Mahal Date: Tue, 15 Oct 2024 16:35:47 -0700 Subject: [PATCH 2/2] fix: usage of `a deprecated Node.js version` in CI --- .github/workflows/book-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/book-cd.yml b/.github/workflows/book-cd.yml index fb38704494..55b2ab1444 100644 --- a/.github/workflows/book-cd.yml +++ b/.github/workflows/book-cd.yml @@ -11,7 +11,7 @@ jobs: contents: write # To push a branch pull-requests: write # To create a PR from that branch steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Install latest mdbook