Skip to content

Node.js 20 actions are deprecated #1503

Node.js 20 actions are deprecated

Node.js 20 actions are deprecated #1503

name: Build and deploy non-main branch to non-production sites
on:
push:
branches-ignore:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout source code (to access sync_sch.sh script)
- name: Checkout source code
uses: actions/checkout@v5
# Step 2: Run the Sync Script
- name: Sync from Peppol repos
run: ./sync_repos.sh
# Step 3: Build Spec
- name: Build Spec
run: bash ./build.sh
# Step 4: Commit generated files
- name: Commit the generated files
shell: bash
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
find . -type f \( -name '*.xml' -o -name '*.sch' \) -print0 | xargs -0 -r git add --
if git diff --cached --quiet; then
echo "No generated changes to commit"
else
git commit -m "Generated by github actions"
git push
fi
# Step 5: Branch name for deployment
- name: Branch name
run: echo Deploying on ${{ secrets.AWS_S3_PATH }}/${GITHUB_REF#refs/heads/}
# Step 6: Deploy on S3
- name: Deploy on S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run:
aws s3 sync --acl public-read --region eu-west-1 target/site ${{ secrets.AWS_S3_PATH }}/${GITHUB_REF#refs/heads/}