Skip to content

Deploy

Deploy #44

Workflow file for this run

name: Deploy to GitHub Pages
on:
workflow_dispatch:
inputs:
force:
description: 'Force deploy'
required: false
default: 'false'
permissions:
contents: write
id-token: write
pages: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release:
name: 🚀 Deploy
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-22.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- name: Download artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
github_token: ${{ secrets.PAT }}
name: github-pages
path: artifact
- name: Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@v3
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: github-pages
path: artifact
- name: Deploy to GitHub Pages
if: steps.semantic.outputs.new_release_published == 'true' || ${{ github.event.inputs.force }} == 'true'
id: deployment
uses: actions/deploy-pages@v2