Skip to content

Commit

Permalink
ci: trigger release only on github releases (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosala authored Aug 5, 2024
1 parent 1c3dd04 commit f5c07a8
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# runs on releases
release: {}
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
actions: read
contents: read
pages: write
id-token: write
Expand All @@ -28,12 +27,10 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Setup Node.js 20
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
Expand All @@ -42,12 +39,12 @@ jobs:
- name: Build
run: pnpm build
- name: Setup Pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
# Upload dist repository
path: "./docs/dist"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v4

0 comments on commit f5c07a8

Please sign in to comment.