Skip to content

Write contents permission #9

Write contents permission

Write contents permission #9

Workflow file for this run

name: Deploy
on: [push]
env:
REGISTRY: ghcr.io
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
uses: docker/build-push-action@v5
with:
cache-to: type=gha,mode=max
cache-from: type=gha
push: false
tags: churchroad-web-demo
# Otherwise, will not be visible to the next step.
load: true
build-args: |
MAKE_JOBS=2
- name: Start container and copy www/ directory
run: |
docker run -d --name churchroad-web-demo churchroad-web-demo
docker cp churchroad-web-demo:/root/target/www out/
docker rm -f churchroad-web-demo
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out