Skip to content

Commit

Permalink
improve ci
Browse files Browse the repository at this point in the history
  • Loading branch information
nilskch committed Aug 24, 2024
1 parent 744af23 commit 3d1911a
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/deploy-stage.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
name: "Deploy to GitHub Pages"

on:
push:
branches: ["main"]
name: "CI/CD"
on: push

permissions:
contents: read
pages: write
id-token: write

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cargo check
run: cargo check
- name: Cargo clippy
run: cargo clippy

build:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -32,6 +39,7 @@ jobs:
path: ./web/dist

deploy:
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down

0 comments on commit 3d1911a

Please sign in to comment.