Merge pull request #337 from EarthCubeGeochron/remove-compose #373
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Documentaton website continuous integration | |
on: | |
push: | |
branches: [main, develop] | |
pull_request: | |
branches: [main, develop] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# https://dev.to/dtinth/caching-docker-builds-in-github-actions-which-approach-is-the-fastest-a-research-18ei | |
- uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
uses: docker/metadata-action@v3 | |
id: meta | |
with: | |
images: ghcr.io/earthcubegeochron/sparrow/documentation-site | |
- name: Build and push website image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: docs/Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=registry,ref=ghcr.io/earthcubegeochron/sparrow/documentation-site:latest | |
cache-to: type=inline | |