chore: release @alauda/doom (#237) #234
This file contains hidden or 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
| name: GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Setup Node.js LTS | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version: lts/* | |
| cache: yarn | |
| - name: Install Dependencies | |
| run: yarn --immutable | |
| - name: Build and Export | |
| run: | | |
| yarn build | |
| # export the docs as pdf first | |
| yarn docs:build -e | |
| yarn docs:export | |
| tempdir=$(mktemp -d) | |
| # copy the pdf to the tempdir | |
| cp -r ./dist/*.pdf $tempdir | |
| # then build the docs with pdf download link | |
| yarn docs:build -a -d -R -S | |
| # copy the pdf back to the dist folder | |
| cp -r $tempdir/*.pdf ./dist | |
| # remove the tempdir | |
| rm -rf $tempdir | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./dist | |
| cname: doom.js.org | |
| full_commit_message: ${{ github.event.head_commit.message }} |