Skip to content

monthly package updates #395

monthly package updates

monthly package updates #395

Workflow file for this run

# Name of workflow
name: Previews workflow
# When workflow is triggered
on:
pull_request:
# Jobs to carry out
jobs:
build:
# Operating system to run job on
runs-on: ubuntu-latest
# Environment to run job on
environment: previews
# Environment variables
env:
DRUPAL_CONCURRENT_FILE_REQUESTS: 20
DRUPAL_REQUEST_TIMEOUT: 6000000
DRUPAL_URL: ${{ vars.DRUPAL_URL }}
# Steps in job
steps:
# Get code from repo
- name: Checkout code
uses: actions/checkout@v4
# Install NodeJS
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
# Run npm install and build on our code
- run: npm install
- run: npm run build
# Deploy to Netlify using our production secrets
- name: Deploy to netlify
run: npx netlify-cli deploy --dir=public --prod --alias deploy-preview-${{ github.event.number }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ vars.NETLIFY_SITE_ID }}
- name: get deploy url
run: echo "DEPLOY_URL=https://deploy-preview-${{ github.event.number }}--future-wwwlib-previews.netlify.app" >> $GITHUB_ENV
- name: Output summary
run: echo $DEPLOY_URL >> $GITHUB_STEP_SUMMARY
- uses: LouisBrunner/[email protected]
if: always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Deploy Preview Link
conclusion: ${{ job.status }}
output: |
{"summary":"${{ env.DEPLOY_URL }}" }
## Notify Slack if build fails
- name: Send custom JSON data to Slack workflow
if: ${{ failure() }}
uses: slackapi/[email protected]
with:
payload: |
{
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"message": "${{ vars.NAME }} build and deploy failed"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}