Merge pull request #10 from dontpanic/master #29
This file contains 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: Publish Docs | |
on: | |
push: | |
branches: | |
- master | |
- main | |
- feature/* | |
env: | |
GITHUB_TOKEN: "${{ secrets.CI_USER_GITHUB_TOKEN }}" | |
jobs: | |
publish: | |
name: Publish | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
pull-requests: write | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: "${{ secrets.CI_USER_GITHUB_TOKEN }}" | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Setup Node with pnpm Cache | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Run pnpm Install | |
run: pnpm i | |
- name: Run Build to Create Dist Directory | |
run: pnpm run build | |
- name: Copy cname file to dist directory | |
run: cp ./.github/CNAME ./docs | |
# Commit all changed files back to the repository | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "chore: publish new version" | |
commit_user_name: "GitHub Actions" | |
commit_user_email: "[email protected]" |