-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (58 loc) · 1.66 KB
/
deploy.yml
File metadata and controls
62 lines (58 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Deploy
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-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- name: Download artifact
uses: dawidd6/action-download-artifact@v19
with:
workflow: build.yml
github_token: ${{ secrets.PAT }}
name: github-pages
path: artifact
- name: Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@v6
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
GIT_AUTHOR_NAME: 'GitHub Actions'
GIT_AUTHOR_EMAIL: 'action@github.com'
GIT_COMMITTER_NAME: 'GitHub Actions'
GIT_COMMITTER_EMAIL: 'action@github.com'
- name: Upload artifact
uses: actions/upload-artifact@v7
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@v5