Removed need for build input file #40
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: Deploy site to gh-pages | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
deploy: | |
name: Deploy updates | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- name: Clean install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Check version | |
id: version-check | |
uses: Endbug/version-check@v2 | |
with: | |
diff-search: true | |
- name: Commit user style changes | |
if: steps.version-check.outputs.changed == 'true' | |
run: | | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
git add public/*.user.css | |
git commit -m "Publish updates v${{ steps.version-check.outputs.version }}" | |
git tag v${{ steps.version-check.outputs.version }} | |
- name: Publish user style changes | |
if: steps.version-check.outputs.changed == 'true' | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
tags: true | |
- name: Deploy site | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs | |
destination_dir: docs |