Skip to content

Update eleventy_build.yml #314

Update eleventy_build.yml

Update eleventy_build.yml #314

name: Eleventy Build
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
actions: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
env:
MY_GITHUB_RUN_ID: ${{ github.run_id }}
RECREATE_IMGS: false
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install dependencies
run: npm ci
- name: Run Build
run: npm run build
- name: Upload artifact
id: upload
uses: actions/upload-pages-artifact@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
path: ./docs
name: context-center
- name: Verify artifact upload
run: ls -l ./docs
- name: Log artifact upload
run: echo "Artifact uploaded with name context-center"
outputs:
artifact_name: "context-center"
test_string: "Test string Foo Bar"
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
steps:
- name: Log artifact name
run: echo "Artifact name ${{ needs.build.outputs.artifact_name }} and here is also a test string ${{ needs.build.outputs.test_string }} "
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: context-center
path: ./docs
- name: Verify artifact download
run: ls -l ./docs
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
with:
artifact_name: context-center
name: context-center
path: ./docs