adding cd for prod
This commit is contained in:
parent
be41040b10
commit
645198efe5
23
.github/workflows/docker.yml
vendored
23
.github/workflows/docker.yml
vendored
@ -10,6 +10,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
name: Build Container
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
@ -28,3 +29,25 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: sarsoo/sarsooxyz.hugo:latest
|
tags: sarsoo/sarsooxyz.hugo:latest
|
||||||
file: Dockerfile.pub
|
file: Dockerfile.pub
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Deploy Prod
|
||||||
|
needs: [docker] # for ignoring bad builds
|
||||||
|
environment:
|
||||||
|
name: prod
|
||||||
|
url: https://sarsoo.xyz
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Tailscale
|
||||||
|
uses: tailscale/github-action@v2
|
||||||
|
with:
|
||||||
|
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
|
||||||
|
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
|
||||||
|
tags: tag:ci
|
||||||
|
version: 1.68.1
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
run: ssh -o StrictHostKeyChecking=no aj@odb -t "cd sarsooxyz-hugo/ && docker compose up -d --pull always"
|
||||||
|
4
.github/workflows/pages.yml
vendored
4
.github/workflows/pages.yml
vendored
@ -29,6 +29,7 @@ jobs:
|
|||||||
# Build job
|
# Build job
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
name: Build Pages
|
||||||
steps:
|
steps:
|
||||||
- name: Install Hugo CLI
|
- name: Install Hugo CLI
|
||||||
run: sudo apt install hugo
|
run: sudo apt install hugo
|
||||||
@ -58,8 +59,9 @@ jobs:
|
|||||||
|
|
||||||
# Deployment job
|
# Deployment job
|
||||||
deploy:
|
deploy:
|
||||||
|
name: Deploy Staging
|
||||||
environment:
|
environment:
|
||||||
name: github-pages
|
name: staging
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs: build
|
||||||
|
Loading…
Reference in New Issue
Block a user