-
-
Notifications
You must be signed in to change notification settings - Fork 414
46 lines (42 loc) · 1.44 KB
/
build-deploy-webpage.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
46
name: Build and Deploy Webpage
on:
push:
branches: [ main ]
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-including-paths
# if [[ ${changed_file} == "CHANGELOG.md" ]] || [[ ${changed_file} = screenshots* ]] || [[ ${changed_file} = webpage* ]] || [[ ${changed_file} = ".github/workflows/build-deploy-webpage.yml" ]] ;
paths:
- 'CHANGELOG.md'
- 'screenshots/**'
- 'webpage/**'
- '.github/workflows/build-deploy-webpage.yml'
workflow_dispatch:
defaults:
run:
working-directory: webpage
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# copy screenshots and changelog to webpage folder
- run: cp ../screenshots src/.vuepress/public -R; cp ../CHANGELOG.md src/changelog.md
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6
with:
push: true
#path: ./webpage
context: ./webpage
file: ./webpage/Dockerfile
tags: pbeke/qownnotes-webpage:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}