Bump the npm_and_yarn group in /uberpage with 2 updates #283
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: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: github.actor != 'dependabot[bot]' | |
strategy: | |
matrix: | |
node-version: [22.x, latest] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: npm install, build, and test | |
run: | | |
cd uberpage | |
npm clean-install | |
npm run lint | |
npm test -- --coverage | |
cp -f src/data.github.js src/data.js | |
../scripts/adjust_homepage.sh "https://stegschreck.github.io" | |
npm run build | |
env: | |
CI: true | |
- name: Codacy Coverage Reporter | |
uses: codacy/codacy-coverage-reporter-action@v1.3.0 | |
with: | |
api-token: ${{ secrets.CODACY_API_TOKEN }} | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
if: github.ref_type == 'tag' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
deploy-gh-page: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Use Node.js latest | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
- name: Build for GH Page | |
run: | | |
cd uberpage | |
npm install -g npm@latest | |
npm clean-install | |
cp -f src/data.github.js src/data.js | |
../scripts/adjust_homepage.sh "https://stegschreck.github.io" | |
npm run build | |
env: | |
CI: true | |
- name: Deploy GitHub Page | |
uses: JamesIves/github-pages-deploy-action@v4 | |
if: github.ref_name == 'master' | |
with: | |
# GitHub repository where assets will be deployed (default current) | |
repository-name: StegSchreck/stegschreck.github.io | |
# Git branch where assets will be deployed | |
branch: master | |
# delete files from your deployment destination that no longer exist in your deployment source | |
clean: true | |
# Build directory to deploy | |
folder: uberpage/build | |
token: ${{ secrets.GHA_PAT }} | |
deploy-aws: | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Use Node.js latest | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
- name: Build for AWS | |
run: | | |
cd uberpage | |
npm install -g npm@latest | |
npm clean-install | |
cp -f src/data.aws.js src/data.js | |
../scripts/adjust_homepage.sh "https://uberpage.schreck.berlin" | |
npm run build | |
env: | |
CI: true | |
- name: Checkout code on S3 | |
uses: reggionick/s3-deploy@v4 | |
with: | |
folder: uberpage/build | |
bucket: ${{ secrets.AWS_S3_BUCKET }} | |
bucket-region: eu-central-1 | |
dist-id: ${{ secrets.AWS_CLOUDFORNT_ID }} | |
delete-removed: true | |
no-cache: true | |
private: true |