Skip to content

Commit e0a2398

Browse files
Update pdf-prod.yml
1 parent 0e7f5f2 commit e0a2398

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

.github/workflows/pdf-prod.yml

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,36 @@
1-
name: Hugo-CI-Prod
1+
name: Hugo-CI
22
on:
33
push:
44
branches:
55
- master
6+
paths-ignore:
7+
'.github/**'
68

79
jobs:
810
job-one:
911
name: Deploy
1012
runs-on: [self-hosted, linux, x64, dev4-pdf]
1113
steps:
12-
- name: hugo build
13-
run: |
14-
git clone https://x-access-token:${{ secrets.GH_PAT }}@github.com/aspose-pdf/Aspose.PDF-Hugo-template.git || (cd Aspose.PDF-Hugo-template && git pull)
15-
cd Aspose.PDF-Hugo-template
16-
rm -rf content
17-
sudo npm install -D --save autoprefixer
18-
sudo npm install -D --save postcss-cli
19-
rsync --recursive --delete --force --progress ../* content/
20-
rm -rf content/Aspose.PDF-Hugo-template
21-
rm -rf public
22-
hugo0.136 --baseURL docs.aspose.com/pdf --config ./config.toml,./configs/docs.aspose.com-pdf.toml
23-
24-
- name: Configure AWS credential
25-
uses: aws-actions/configure-aws-credentials@v3
26-
with:
27-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
28-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
29-
aws-region: us-west-2
30-
31-
- name: Deploy static site to S3 bucket
32-
run: |
33-
cd Aspose.PDF-Hugo-template
34-
aws s3 sync ./public/ s3://docs.aspose.com/pdf --delete
14+
- name: hugo build
15+
run: |
16+
git clone https://x-access-token:${{ secrets.GH_PAT }}@github.com/aspose-pdf/Aspose.PDF-Hugo-template.git || (cd Aspose.PDF-Hugo-template && git pull)
17+
cd Aspose.PDF-Hugo-template
18+
rm -rf content
19+
sudo npm install -D --save autoprefixer
20+
sudo npm install -D --save postcss-cli
21+
rsync --recursive --delete --force --progress ../* content/
22+
rm -rf content/Aspose.PDF-Hugo-template
23+
rm -rf public
24+
hugo0.136 --baseURL docs.aspose.com/pdf --config ./config.toml,./configs/docs.aspose.com-pdf.toml
25+
rsync --recursive --delete --force -e "ssh" --progress public/ ${{ secrets.TRANSFERPATH }}
26+
- name: hugo deploy
27+
uses: appleboy/ssh-action@master
28+
with:
29+
host: ${{ secrets.HOST }}
30+
username: ${{ secrets.USERNAME }}
31+
key: ${{ secrets.SSHKEY }}
32+
port: ${{ secrets.SSHPORT }}
33+
script: |
34+
sudo rsync --recursive --delete --force --progress ${{ secrets.PUBLICCONTENTPATH }} ${{ secrets.DEPLOYPATH }}
35+
sudo chmod -R 755 ${{ secrets.DEPLOYPATH }}
36+
sudo nginx -s reload

0 commit comments

Comments
 (0)