Deploy #38
Workflow file for this run
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: Deploy | |
on: | |
push: | |
tags: | |
- '**' | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- name: Skip for non-tagged refs | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
run: | | |
echo "Dispatched from ${{github.ref}} — skipping deploy" | |
exit 1 | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Set basePath variable | |
id: vars | |
run: echo "basePath=${{ github.event.repository.name }}" >> $GITHUB_ENV | |
- name: Build | |
run: npm run build -- --base=/${{ env.basePath }} | |
- name: Copy issue templates to output | |
run: | | |
cp README.md dist/ | |
mkdir -p dist/.github/ISSUE_TEMPLATE | |
cp -r .github/ISSUE_TEMPLATE/* dist/.github/ISSUE_TEMPLATE/ | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist | |
full_commit_message: 'Deployment ${{ github.ref_name }}' | |
exclude_assets: '' |