2023-06-10 17:02:47 -04:00
|
|
|
name: rtj.dev Build and Deploy
|
|
|
|
run-name: Build and Deploy
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
Build-and-Deploy:
|
|
|
|
runs-on: docker
|
2023-06-10 18:06:03 -04:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: sh
|
2023-06-10 17:02:47 -04:00
|
|
|
steps:
|
2023-06-10 17:17:16 -04:00
|
|
|
- name: Setup node.js
|
2023-06-10 17:40:45 -04:00
|
|
|
run: |
|
2024-02-12 22:45:48 -05:00
|
|
|
apk --update add nodejs npm git curl
|
2023-06-16 22:38:01 -04:00
|
|
|
- name: Check out repository code recursively
|
2023-06-10 17:02:47 -04:00
|
|
|
uses: actions/checkout@v3
|
2023-06-10 18:48:17 -04:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2024-02-16 18:54:16 -05:00
|
|
|
- name: Pass login information
|
2023-06-15 10:04:01 -04:00
|
|
|
run: |
|
2024-02-16 18:54:16 -05:00
|
|
|
mkdir -p $HOME/.docker
|
|
|
|
echo "${{ secrets.DOCKER_AUTH_CONFIG }}" | base64 -d > $HOME/.docker/config.json
|
2023-06-10 17:02:47 -04:00
|
|
|
- name: Build Docker Image
|
|
|
|
run: |
|
2023-06-15 10:07:15 -04:00
|
|
|
cd ${{ gitea.workspace }}
|
2023-06-10 19:53:04 -04:00
|
|
|
docker build -f Dockerfile -t git.rtj.dev/roland/rtj.dev:0.0.1 .
|
|
|
|
docker push git.rtj.dev/roland/rtj.dev:0.0.1
|
2024-02-12 22:36:14 -05:00
|
|
|
- name: Signal Restart
|
|
|
|
run: |
|
2024-02-12 23:35:51 -05:00
|
|
|
curl ${{ secrets.OPTIONS }} "${{ secrets.API_KEY }}" ${{ secrets.ENDPOINT }}
|