Pin CI actions, exclude unattended dependency runs, and isolate deployment [skip ci]
This commit is contained in:
parent
d949e1645e
commit
c2e2047ea8
1 changed files with 34 additions and 6 deletions
|
|
@ -19,10 +19,10 @@ jobs:
|
|||
cancel-in-progress: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
uses: https://github.com/actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'npm'
|
||||
|
|
@ -45,10 +45,12 @@ jobs:
|
|||
- name: End-to-end smoke test
|
||||
run: npm run test:e2e
|
||||
|
||||
if: ${{ github.actor != 'renovate-bot' && !startsWith(github.ref, 'refs/heads/renovate/') && !startsWith(github.head_ref, 'renovate/') }}
|
||||
deploy:
|
||||
runs-on: docker
|
||||
needs: validate
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
if: ${{ github.actor != 'renovate-bot' && !startsWith(github.ref, 'refs/heads/renovate/') && !startsWith(github.head_ref, 'renovate/') && (github.event_name ==
|
||||
'push' && github.ref == 'refs/heads/main') }}
|
||||
# Never cancel an in-flight deploy: rsync --delete must finish or the live
|
||||
# site can be left half-deleted. Newer deploys queue behind this one.
|
||||
concurrency:
|
||||
|
|
@ -56,10 +58,10 @@ jobs:
|
|||
cancel-in-progress: false
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
uses: https://github.com/actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'npm'
|
||||
|
|
@ -70,8 +72,34 @@ jobs:
|
|||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Upload static site artifact 1
|
||||
if: ${{ (true) }}
|
||||
uses: https://github.com/actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5
|
||||
with:
|
||||
name: pages-deploy-0
|
||||
path: dist
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
deploy-pages:
|
||||
name: Deploy static site artifacts
|
||||
needs: deploy
|
||||
if: ${{ github.actor != 'renovate-bot' && !startsWith(github.ref, 'refs/heads/renovate/') && !startsWith(github.head_ref, 'renovate/') && ((true)) }}
|
||||
runs-on: pages
|
||||
container:
|
||||
image: node:22-bookworm@sha256:63538dfe497cc29dfafdda25ada09b46db68a3f4cc205abf1f5d6bf0913f3384
|
||||
volumes:
|
||||
- /pages/photos:/pages/photos
|
||||
concurrency:
|
||||
group: pages-deploy-photos
|
||||
cancel-in-progress: false
|
||||
steps:
|
||||
- name: Download static site artifact 1
|
||||
uses: https://github.com/actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
|
||||
with:
|
||||
name: pages-deploy-0
|
||||
path: dist
|
||||
- name: Copy build to host pages mount
|
||||
uses: http://forgejo:3000/andras/ci-actions/deploy-pages@main
|
||||
uses: https://git.schmelczer.dev/andras/ci-actions/deploy-pages@a415e2a50992af99b7b6dd3f02cca372d87b11f6
|
||||
with:
|
||||
source: dist
|
||||
target: photos
|
||||
|
|
|
|||
Loading…
Reference in a new issue