Skip to content

First GitHub action test #2

First GitHub action test

First GitHub action test #2

Workflow file for this run

name: PR Preview Deploy
on:
pull_request:
types: [opened, synchronize, reopened, closed, merged]
jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Check Token Presence
run: |
if [ -n "${{ secrets.TRIGGER_ACCESS_TOKEN }}" ]; then
echo "TRIGGER_ACCESS_TOKEN is set"
else
echo "TRIGGER_ACCESS_TOKEN is not set"
exit 1
fi
- name: Deploy to Preview Environment
run: npx [email protected] deploy --env preview
env:
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}