Skip to content

Commit 39dc667

Browse files
committed
ci: move docker image buildining into another workflow
1 parent 2bd321b commit 39dc667

File tree

2 files changed

+24
-14
lines changed

2 files changed

+24
-14
lines changed

.github/workflows/build-and-deploy.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ env:
2121

2222
jobs:
2323
build:
24+
name: Build Pan Docs
2425
runs-on: ubuntu-latest
2526
steps:
2627
- name: Checkout pandocs
@@ -69,6 +70,7 @@ jobs:
6970
if-no-files-found: error
7071

7172
deploy:
73+
name: Deploy to GitHub pages
7274
runs-on: ubuntu-latest
7375
needs: build
7476
# Do not run this unless *pushing* to `master`
@@ -100,17 +102,3 @@ jobs:
100102
git add -A
101103
git commit -am 'Update build'
102104
git push -v
103-
publish-docker-image:
104-
runs-on: ubuntu-latest
105-
steps:
106-
- uses: actions/checkout@v2
107-
- name: Login to GitHub Container Registry
108-
uses: docker/login-action@v1
109-
with:
110-
registry: ghcr.io
111-
username: ${{ github.actor }}
112-
password: ${{ secrets.GITHUB_TOKEN }}
113-
- name: Build and push Docker image to the GHCR
114-
run: |
115-
docker build . --tag ghcr.io/gbdev/pandocs:latest
116-
docker push ghcr.io/gbdev/pandocs:latest
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Build Docker image and publish it to GitHub Container Registry
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
publish-docker-image:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Login to GitHub Container Registry
14+
uses: docker/login-action@v1
15+
with:
16+
registry: ghcr.io
17+
username: ${{ github.actor }}
18+
password: ${{ secrets.GITHUB_TOKEN }}
19+
- name: Build and push Docker image to the GHCR
20+
run: |
21+
docker build . --tag ghcr.io/gbdev/pandocs:latest
22+
docker push ghcr.io/gbdev/pandocs:latest

0 commit comments

Comments
 (0)