Skip to content

test pipeline

test pipeline #15

Workflow file for this run

name: generate page site
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Publish to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v4
- run: npm ci
- run: npm run docs:build
- name: Check if version has been updated
if: ${{ github.ref == 'refs/heads/master' }}
run: |
echo "$(git describe --tags --abbrev=0 2>/dev/null || echo '')"
echo "previous_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo '')" >> $GITHUB_ENV
- name: Build Release (tag, release)
id: create_tag
uses: jaywcjlove/create-tag-action@main
if: env.previous_tag
with:
release: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
if: steps.check.outputs.has_changed == 'true'
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: dockit-site
directory: dist
# Optional: Enable this if you want to have GitHub Deployments triggered
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: main
environment: production