2020-02-07 22:49:04 +00:00
|
|
|
name: "Nix"
|
|
|
|
on:
|
|
|
|
push:
|
2020-07-16 19:32:30 +00:00
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
2020-02-07 22:49:04 +00:00
|
|
|
jobs:
|
2020-07-16 19:32:30 +00:00
|
|
|
docker-build:
|
2020-02-07 22:49:04 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-07-16 19:32:30 +00:00
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: cachix/install-nix-action@v6
|
|
|
|
- uses: cachix/cachix-action@v3
|
|
|
|
with:
|
|
|
|
name: xe
|
|
|
|
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
|
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
2020-09-01 21:17:38 +00:00
|
|
|
- name: Log into GitHub Container Registry
|
|
|
|
run: echo "${{ secrets.CR_PAT }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
|
|
|
|
- name: Docker push
|
|
|
|
run: |
|
2020-07-16 19:32:30 +00:00
|
|
|
docker load -i result
|
2020-09-01 21:17:38 +00:00
|
|
|
docker tag xena/christinewebsite:latest ghcr.io/xe/site:$GITHUB_SHA
|
|
|
|
docker push ghcr.io/xe/site
|
2020-07-16 19:32:30 +00:00
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: docker-build
|
|
|
|
if: github.ref == 'refs/heads/master'
|
|
|
|
steps:
|
2020-07-16 19:41:55 +00:00
|
|
|
- uses: actions/checkout@v1
|
2020-07-16 19:32:30 +00:00
|
|
|
- uses: cachix/install-nix-action@v6
|
|
|
|
- name: deploy
|
|
|
|
run: ./scripts/release.sh
|
|
|
|
env:
|
|
|
|
DIGITALOCEAN_ACCESS_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
|
|
|
|
MI_TOKEN: ${{ secrets.MI_TOKEN }}
|
|
|
|
PATREON_ACCESS_TOKEN: ${{ secrets.PATREON_ACCESS_TOKEN }}
|
|
|
|
PATREON_CLIENT_ID: ${{ secrets.PATREON_CLIENT_ID }}
|
|
|
|
PATREON_CLIENT_SECRET: ${{ secrets.PATREON_CLIENT_SECRET }}
|
|
|
|
PATREON_REFRESH_TOKEN: ${{ secrets.PATREON_REFRESH_TOKEN }}
|