Skip to content
This repository was archived by the owner on Jan 21, 2025. It is now read-only.

Commit f01b6e8

Browse files
committed
fix: rewrite actions.yaml to push to github-pages
1 parent 1add0e9 commit f01b6e8

File tree

1 file changed

+20
-27
lines changed

1 file changed

+20
-27
lines changed

.github/workflows/actions.yaml

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,20 @@
1-
name: GitHub Actions
1+
name: Deploy to GitHub Pages
22

33
on:
4-
pull_request:
5-
branches:
6-
- main
4+
# Trigger the workflow every time you push to the `main` branch
5+
# Using a different branch name? Replace `main` with your branch’s name
76
push:
8-
branches:
9-
- main
7+
branches: [main]
8+
# Allows you to run this workflow manually from the Actions tab on GitHub.
9+
workflow_dispatch:
10+
1011
# Allow this job to clone the repo and create a page deployment
1112
permissions:
1213
contents: read
1314
pages: write
1415
id-token: write
1516

16-
1717
jobs:
18-
build:
19-
needs: check
20-
runs-on: ubuntu-latest
21-
strategy:
22-
matrix:
23-
node-version:
24-
- 18
25-
- 20
26-
- 22
27-
steps:
28-
- uses: actions/checkout@v4
29-
- name: Use Node.js v${{ matrix.node-version }}
30-
uses: actions/setup-node@v4
31-
with:
32-
node-version: ${{ matrix.node-version }}
33-
cache: npm
34-
- run: npm ci
35-
- run: npm run build
36-
# - run: npm test
37-
3818
check:
3919
runs-on: ubuntu-latest
4020
steps:
@@ -47,6 +27,19 @@ jobs:
4727
- run: npm ci
4828
- run: npm run check
4929

30+
build:
31+
needs: check
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout your repository using git
35+
uses: actions/checkout@v4
36+
- name: Install, build, and upload your site
37+
uses: withastro/action@v3
38+
# with:
39+
# path: . # The root location of your Astro project inside the repository. (optional)
40+
# node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 20. (optional)
41+
# package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
42+
5043
deploy:
5144
needs: build
5245
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)