Skip to content

Build Eleventy

Build Eleventy #19528

Workflow file for this run

name: Build Eleventy
on:
schedule:
- cron: "0 * * * *"
push:
branches:
- main
paths-ignore:
- "META.d/**"
- "**/*.md"
pull_request_target:
types:
- opened
- reopened
- ready_for_review
- synchronize
paths-ignore:
- "META.d/**"
- "**/*.md"
workflow_dispatch: {} # allow manual triggering just in case
concurrency: ${{ github.workflow }}-${{ github.head_ref }}
env:
GIT_REF: ${{ github.head_ref || github.ref }}
GIT_REPO: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
issues: read
pull-requests: read
actions: read
checks: read
statuses: read
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ env.GIT_REF }}
repository: ${{ env.GIT_REPO }}
- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 18
- name: Install dependencies
run: |
yarn install --frozen-lockfile
- name: Grab data updates
run: node ./scripts/collect-status.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build Site
run: yarn build
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
id: artifact-upload-step
with:
name: build-artifact
path: _site
retention-days: 14
publish:
name: Publish to GH Pages
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request && github.ref == 'refs/heads/main' }}
needs:
- build
permissions:
contents: write
pages: write
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: build-artifact
path: _site
- name: Deploy
uses: peaceiris/actions-gh-pages@v3 # TSCCR: could not find entry for peaceiris/actions-gh-pages
with:
publish_dir: ./_site
github_token: ${{ secrets.GITHUB_TOKEN }}
report:
name: Report status
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request && failure() }}
needs:
- build
permissions:
contents: read
steps:
- name: Send failures to Slack
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
with:
payload: |
{
"name": "cdktf-provider-dashboard",
"run_url": "https://github.com/cdktf/cdktf-provider-dashboard/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.FAILURE_SLACK_WEBHOOK_URL }}