Skip to content

feat(develop): testing self hosted runners #1

feat(develop): testing self hosted runners

feat(develop): testing self hosted runners #1

name: Deploy to S3
on:
push:
branches:
- develop # Set a branch to deploy
# pull_request:
jobs:
deploy:
runs-on: [self-hosted]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Hugo setup
uses: peaceiris/[email protected]
with:
hugo-version: '0.132.0'
extended: true
- name: Replace Placeholder
env:
TRACKING_ID: ${{ secrets.TRACKING_ID }}
run: |
sed -i "s/TRACKING_ID/$TRACKING_ID/g" config/_default/params.yaml
- name: check output
run: |
cat config/_default/params.yaml
# - name: Build
# run: hugo --minify
# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v1-node16
# with:
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws-region: eu-west-1
# - name: Deploy
# run: aws s3 sync --delete ./public s3://${{ secrets.BUCKET_NAME }}
# - name: Invalidate CloudFront
# uses: chetan/invalidate-cloudfront-action@v2
# env:
# DISTRIBUTION: ${{ secrets.DISTRIBUTION }}
# PATHS: "/*"
# AWS_REGION: "us-west-1"
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}