Skip to content

Run build job on pull requests and "modern" deploy actions #120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 25 additions & 6 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,23 @@ on:
push:
branches:
- master
pull_request: null

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

permissions: {}

jobs:
deploy:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
persist-credentials: false

- name: Install pnpm
uses: pnpm/action-setup@v3
Expand Down Expand Up @@ -48,9 +52,24 @@ jobs:
run: |
pnpm run build

- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v4
- name: Upload build artifact
id: deployment
if: ${{ github.ref_name == 'master' }}
uses: actions/upload-pages-artifact@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: docs/.vitepress/dist
cname: docs.sublimetext.io
path: docs/.vitepress/dist/

deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
if: ${{ github.ref_name == 'master' }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4