-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (43 loc) · 1.19 KB
/
publish.yml
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
on:
push:
branches: main
registry_package:
types: [published, updated]
workflow_dispatch:
permissions:
contents: write
name: Render and publish
jobs:
imagename:
runs-on: ubuntu-latest
outputs:
lowercase: ${{ steps.lowercase.outputs.test }}
steps:
-
name: Convert the repo name to lowercase.
id: lowercase
run: echo "::set-output name=test::$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')"
publish:
runs-on: ubuntu-latest
needs: imagename
container: ghcr.io/${{needs.imagename.outputs.lowercase}}:main
steps:
-
name: Checkout repository
uses: actions/checkout@v3
-
name: Make things to be published.
run: |
make publish/
-
name: Publish 🚀
# only publish when push to main
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4
with:
# The branch the action should deploy to.
branch: gh-pages
# The folder the action should deploy.
folder: publish/
# Organizations require token of the bearer!
token: ${{ secrets.GITHUB_TOKEN }}