Skip to content

Commit

Permalink
Workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
gussmith23 committed Apr 22, 2024
1 parent 5242165 commit 2c51127
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 9 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build

on: [push, pull_request, workflow_dispatch]
on: [pull_request]

jobs:
build:
Expand All @@ -11,14 +11,9 @@ jobs:
submodules: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# -
# name: Login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
- name: Build
uses: docker/build-push-action@v5
with:
cache-to: type=gha,mode=max
cache-from: type=gha
push: false
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy

on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
with:
submodules: true

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- 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

- 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 }}

0 comments on commit 2c51127

Please sign in to comment.