Skip to content

Commit ec2da4f

Browse files
committed
Fix GitHub Actions: Update to latest action versions
Changes: - actions/checkout@v3 → v4 - Replaced withastro/action@v1 with manual setup - Using actions/upload-pages-artifact@v3 (not deprecated v2) - actions/deploy-pages@v1 → v4 - Using Bun for faster builds Fixes deprecated actions error: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/ Status: Ready for GitHub Pages deployment
1 parent 132a16f commit ec2da4f

1 file changed

Lines changed: 19 additions & 13 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
name: Deploy to GitHub Pages
22

33
on:
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
64
push:
75
branches: [main]
8-
# Allows you to run this workflow manually from the Actions tab on GitHub.
96
workflow_dispatch:
107

11-
# Allow this job to clone the repo and create a page deployment
128
permissions:
139
contents: read
1410
pages: write
@@ -18,14 +14,24 @@ jobs:
1814
build:
1915
runs-on: ubuntu-latest
2016
steps:
21-
- name: Checkout your repository using git
22-
uses: actions/checkout@v3
23-
- name: Install, build, and upload your site
24-
uses: withastro/action@v1
25-
# with:
26-
# path: . # The root location of your Astro project inside the repository. (optional)
27-
# node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 18. (optional)
28-
# 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)
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Bun
21+
uses: oven-sh/setup-bun@v1
22+
with:
23+
bun-version: latest
24+
25+
- name: Install dependencies
26+
run: bun install
27+
28+
- name: Build with Astro
29+
run: bun run build
30+
31+
- name: Upload artifact
32+
uses: actions/upload-pages-artifact@v3
33+
with:
34+
path: ./dist
2935

3036
deploy:
3137
needs: build
@@ -36,4 +42,4 @@ jobs:
3642
steps:
3743
- name: Deploy to GitHub Pages
3844
id: deployment
39-
uses: actions/deploy-pages@v1
45+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)