2020-08-11 07:53:09 +00:00
|
|
|
name: Docs
|
2020-09-04 10:23:15 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- 'site/**'
|
2020-08-11 07:53:09 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
builddocs:
|
|
|
|
name: Build Doc Frontend
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: ./site
|
|
|
|
steps:
|
|
|
|
- name: Checkout Repo
|
|
|
|
uses: actions/checkout@v2
|
2020-12-01 15:35:58 +00:00
|
|
|
- uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
file: ./site/dockerfile
|
|
|
|
platforms: linux/amd64
|
|
|
|
tags: zitadel:docs
|
|
|
|
push: false
|
|
|
|
outputs: type=local,dest=output
|
2020-08-11 07:53:09 +00:00
|
|
|
- name: Archive Production Artifact
|
|
|
|
uses: actions/upload-artifact@master
|
|
|
|
with:
|
|
|
|
name: export
|
2020-12-01 15:35:58 +00:00
|
|
|
path: output
|
2020-08-11 07:53:09 +00:00
|
|
|
deploydocs:
|
|
|
|
name: Deploy
|
|
|
|
needs: builddocs
|
|
|
|
runs-on: ubuntu-latest
|
2020-09-09 14:10:35 +00:00
|
|
|
if: github.ref == 'refs/heads/master'
|
2020-08-11 07:53:09 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout Repo
|
|
|
|
uses: actions/checkout@master
|
|
|
|
- name: Download Artifact
|
|
|
|
uses: actions/download-artifact@master
|
|
|
|
with:
|
|
|
|
name: export
|
|
|
|
path: site/__sapper__/export
|
|
|
|
- name: Add CNAME file
|
|
|
|
run: echo "docs.zitadel.ch" > site/__sapper__/export/CNAME
|
|
|
|
- name: Deploy
|
|
|
|
uses: JamesIves/github-pages-deploy-action@releases/v3
|
|
|
|
with:
|
|
|
|
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
|
|
|
BRANCH: gh-pages
|
|
|
|
FOLDER: site/__sapper__/export
|
2020-10-02 07:38:49 +00:00
|
|
|
CLEAN: true
|