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

Commit 6cdf050

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

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/actions.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
push:
88
branches:
99
- main
10+
1011
# Allow this job to clone the repo and create a page deployment
1112
permissions:
1213
contents: read
@@ -57,3 +58,56 @@ jobs:
5758
- name: Deploy to GitHub Pages
5859
id: deployment
5960
uses: actions/deploy-pages@v4
61+
62+
name: Deploy to GitHub Pages
63+
64+
on:
65+
# Trigger the workflow every time you push to the `main` branch
66+
# Using a different branch name? Replace `main` with your branch’s name
67+
push:
68+
branches: [main]
69+
# Allows you to run this workflow manually from the Actions tab on GitHub.
70+
workflow_dispatch:
71+
72+
# Allow this job to clone the repo and create a page deployment
73+
permissions:
74+
contents: read
75+
pages: write
76+
id-token: write
77+
78+
jobs:
79+
check:
80+
runs-on: ubuntu-latest
81+
steps:
82+
- uses: actions/checkout@v4
83+
- name: Use Node.js 22
84+
uses: actions/setup-node@v4
85+
with:
86+
node-version: 22
87+
cache: npm
88+
- run: npm ci
89+
- run: npm run check
90+
91+
build:
92+
needs: check
93+
runs-on: ubuntu-latest
94+
steps:
95+
- name: Checkout your repository using git
96+
uses: actions/checkout@v4
97+
- name: Install, build, and upload your site
98+
uses: withastro/action@v3
99+
# with:
100+
# path: . # The root location of your Astro project inside the repository. (optional)
101+
# node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 20. (optional)
102+
# 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)
103+
104+
deploy:
105+
needs: build
106+
runs-on: ubuntu-latest
107+
environment:
108+
name: github-pages
109+
url: ${{ steps.deployment.outputs.page_url }}
110+
steps:
111+
- name: Deploy to GitHub Pages
112+
id: deployment
113+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)