-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (33 loc) · 1.11 KB
/
publish.yaml
File metadata and controls
37 lines (33 loc) · 1.11 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
name: Publish GitHub Pages
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
jobs:
build:
uses: noid-dev/codewars-openapi/.github/workflows/build.yaml@main
publish:
needs: build
runs-on: ubuntu-22.04
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
with:
ref: gh-pages
- name: Download artifacts
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
with:
name: gh-pages
- name: Update Git pages
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add -A
if ! git diff-index --quiet HEAD; then
git commit -m "${{ github.event.head_commit.message || 'chore: sync-up github pages (run #$GITHUB_RUN_NUMBER)' }}"
git push -f origin gh-pages
echo '☑️ GitHub Pages have been updated.' >> $GITHUB_STEP_SUMMARY
else
echo '✅ GitHub Pages are already up-to-date.' >> $GITHUB_STEP_SUMMARY
fi