fix pipeline #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Hugo-CI | ||
on: | ||
push: | ||
branches: | ||
- develop1 | ||
paths-ignore: | ||
'.github/**' | ||
jobs: | ||
job-one: | ||
name: Deploy | ||
runs-on: [self-hosted, linux, x64, dev4-pdf] | ||
steps: | ||
- name: Checkout private tools | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: github.com/aspose-pdf/Aspose.PDF-Hugo-template.git | ||
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT | ||
path: themes | ||
- name: hugo build | ||
run: | | ||
# git clone https://github.com/aspose-pdf/Aspose.PDF-Documentation.git || (cd Aspose.PDF-Documentation && git pull) | ||
# git clone --single-branch --branch master https://github.com/aspose-pdf/Aspose.PDF-Hugo-template.git themes/Aspose.PDF-Hugo-template || (cd themes/Aspose.PDF-Hugo-template && git pull) | ||
cd themes | ||
sudo npm install -D --save autoprefixer | ||
sudo npm install -D --save postcss-cli | ||
rsync --recursive --delete --force --progress ../* content/ | ||
rm -rf public | ||
hugo --baseURL docs-qa.aspose.com/pdf --config ./config.toml;./configs/docs-qa.aspose.com-pdf.toml | ||
# rsync --recursive --delete --force -e "ssh" --progress public/ ${{ secrets.TRANSFERPATH }} | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-west-2 | ||
- name: Deploy static site to S3 bucket | ||
run: aws s3 sync ./public/ s3://docs-qa.aspose.com/pdf --delete | ||
# - name: hugo deploy | ||
# uses: appleboy/ssh-action@master | ||
# with: | ||
# host: ${{ secrets.HOST }} | ||
# username: ${{ secrets.USERNAME }} | ||
# key: ${{ secrets.SSHKEY }} | ||
# port: ${{ secrets.SSHPORT }} | ||
# script: | | ||
# sudo rsync --recursive --delete --force --progress ${{ secrets.PUBLICCONTENTPATH }} ${{ secrets.DEPLOYPATH }} | ||
# sudo chmod -R 755 ${{ secrets.DEPLOYPATH }} | ||
# sudo nginx -s reload |