Refactor build process scripts and update rsync paths for deployment.
Some checks failed
Build and Deploy Hugo Site / build_and_deploy (push) Failing after 16s
Some checks failed
Build and Deploy Hugo Site / build_and_deploy (push) Failing after 16s
This commit is contained in:
parent
72fc0af913
commit
7ea8a63396
1 changed files with 2 additions and 43 deletions
|
|
@ -18,47 +18,6 @@ jobs:
|
||||||
config: ${{ github.workspace }}/deploy_env.yaml
|
config: ${{ github.workspace }}/deploy_env.yaml
|
||||||
env-var-prefix: myEnv
|
env-var-prefix: myEnv
|
||||||
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v5.0.0
|
|
||||||
with:
|
|
||||||
go-version: '1.20.5'
|
|
||||||
|
|
||||||
- name: Cache Go modules
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: ~/go/pkg/mod
|
|
||||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-go-
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v4.0.2
|
|
||||||
with:
|
|
||||||
node-version: '20'
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Cache Node modules
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: ~/.npm
|
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-node-
|
|
||||||
|
|
||||||
- name: Install PostCSS
|
|
||||||
run: |
|
|
||||||
npm install -g postcss postcss-cli
|
|
||||||
npm install autoprefixer
|
|
||||||
|
|
||||||
- name: Set up Hugo Extended
|
|
||||||
uses: peaceiris/actions-hugo@v3.0.0
|
|
||||||
with:
|
|
||||||
hugo-version: '0.121.2'
|
|
||||||
extended: true
|
|
||||||
|
|
||||||
- name: Build Hugo site
|
|
||||||
run: hugo --minify
|
|
||||||
|
|
||||||
- name: Setup rsync
|
- name: Setup rsync
|
||||||
run: apt-get update && apt-get install -y rsync
|
run: apt-get update && apt-get install -y rsync
|
||||||
|
|
||||||
|
|
@ -70,13 +29,13 @@ jobs:
|
||||||
- name: Deploy to Development
|
- name: Deploy to Development
|
||||||
if: env.myEnv_env == 'development'
|
if: env.myEnv_env == 'development'
|
||||||
run: |
|
run: |
|
||||||
rsync -avz --delete ./ verua.info@verua.info:/preview.verua.info/
|
rsync -avz --delete ./public/ verua.info@verua.info:/preview.verua.info/
|
||||||
env:
|
env:
|
||||||
RSYNC_RSH: 'ssh -p 2121 -o StrictHostKeyChecking=no'
|
RSYNC_RSH: 'ssh -p 2121 -o StrictHostKeyChecking=no'
|
||||||
|
|
||||||
- name: Deploy to Production
|
- name: Deploy to Production
|
||||||
if: env.myEnv_env == 'production'
|
if: env.myEnv_env == 'production'
|
||||||
run: |
|
run: |
|
||||||
rsync -avz --delete ./ verua.info@verua.info:/httpdocs/
|
rsync -avz --delete ./public/ verua.info@verua.info:/httpdocs/
|
||||||
env:
|
env:
|
||||||
RSYNC_RSH: 'ssh -p 2121 -o StrictHostKeyChecking=no'
|
RSYNC_RSH: 'ssh -p 2121 -o StrictHostKeyChecking=no'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue