Update .github/workflows/build.yml
Some checks failed
Build Eleventy / build (push) Failing after 2m47s
Some checks failed
Build Eleventy / build (push) Failing after 2m47s
This commit is contained in:
parent
7d6a48ab40
commit
034add9a6a
1 changed files with 67 additions and 33 deletions
38
.github/workflows/build.yml
vendored
38
.github/workflows/build.yml
vendored
|
|
@ -1,3 +1,38 @@
|
|||
name: Build Eleventy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- 'maintenance/**'
|
||||
- 'README.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'maintenance/**'
|
||||
- 'README.md'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on:
|
||||
- arch-linux
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build site
|
||||
run: npm run build
|
||||
|
||||
- name: Publish to forgejo-pages
|
||||
if: github.ref == 'refs/heads/main'
|
||||
env:
|
||||
|
|
@ -6,9 +41,8 @@
|
|||
git config --global user.name "Forgejo Actions"
|
||||
git config --global user.email "actions@localhost"
|
||||
|
||||
# Build authenticated clone URL
|
||||
REPO_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
|
||||
AUTH_URL="$(echo "$REPO_URL" | sed "s#^https://#https://oauth2:${TOKEN}@#")"
|
||||
AUTH_URL="$(printf '%s\n' "$REPO_URL" | sed "s#^https://#https://oauth2:${TOKEN}@#")"
|
||||
|
||||
git clone "$AUTH_URL" deploy
|
||||
cd deploy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue