update version 0,9 #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' }} | |
uses: EndBug/version-check@v2 | |
id: check | |
- name: Create new tag against package.json version | |
uses: neverendingqs/gh-action-tag-on-npm-version@master | |
if: steps.check.outputs.changed == 'true' | |
- name: Build Release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
if: steps.check.outputs.changed == 'true' | |
with: | |
prerelease: false | |
repo_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 |