2024-02-02 14:16:07 +00:00
|
|
|
name: work.suroh.tk deploy
|
2024-02-02 14:35:55 +00:00
|
|
|
run-name: ${{ github.repository }} is being built and deployed
|
2024-02-02 14:16:07 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'main'
|
|
|
|
jobs:
|
|
|
|
build-deploy:
|
|
|
|
runs-on: ubuntu-latest
|
2024-02-02 16:04:27 +00:00
|
|
|
container:
|
|
|
|
volumes:
|
|
|
|
- /var/www:/www
|
2024-02-02 14:16:07 +00:00
|
|
|
steps:
|
|
|
|
- name: Clone code to runner
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Move to directory
|
|
|
|
run: cd ${{ github.workspace }}
|
|
|
|
|
2024-02-02 14:23:12 +00:00
|
|
|
- name: Install dependencies
|
2024-02-02 14:27:06 +00:00
|
|
|
run: npm i
|
2024-02-02 14:16:07 +00:00
|
|
|
|
2024-02-02 14:23:12 +00:00
|
|
|
- name: Build 11ty site
|
2024-02-02 14:35:55 +00:00
|
|
|
run: npm run build
|
2024-02-02 14:23:12 +00:00
|
|
|
|
2024-02-02 15:22:35 +00:00
|
|
|
- name: Copy built site to data folder
|
2024-02-02 16:05:19 +00:00
|
|
|
run: mkdir /www/work.suroh.tk && cp -r _site /www/work.suroh.tk
|