Skip to content

Add items from newsletter changelog to what's new (#1124) #742

Add items from newsletter changelog to what's new (#1124)

Add items from newsletter changelog to what's new (#1124) #742

Workflow file for this run

name: Deploy ngrok docs
on:
push:
branches:
- main
concurrency:
group: "deploy"
jobs:
deploy:
name: Deploy ngrok docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
registry-url: "https://registry.npmjs.org"
cache: 'pnpm'
- name: "Create env file"
run: |
echo DEPLOY_ENV=prod > .env
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build website
run: pnpm run build
# This is mostly the same as the write-rss.yml workflow
# Its duplicated because the below Deploy step will --delete any
# files in the S3 bucket that are not in the build directory
# But we are keeping the other workflow as well so it can run
# on a schedule to keep the RSS feeds up to date
- name: Fetch and Modify RSS Feed
run: |
curl -s https://webflow.dev-ngrok.com/blog-post/rss.xml | sed 's/webflow.dev-ngrok.com/dev-ngrok.com/g' > dev-rss.xml
curl -s https://webflow.stage-ngrok.com/blog-post/rss.xml | sed 's/webflow.stage-ngrok.com/stage-ngrok.com/g' > stage-rss.xml
curl -s https://webflow.ngrok.com/blog-post/rss.xml | sed 's/webflow.ngrok.com/ngrok.com/g' > rss.xml
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- name: Deploy
run: |
mkdir -p ./build/blog-post
mv dev-rss.xml ./build/blog-post/rss.xml
aws s3 sync ./build s3://docs-s3.dev-ngrok.com/docs --delete --acl public-read
mv stage-rss.xml ./build/blog-post/rss.xml
aws s3 sync ./build s3://docs-s3.stage-ngrok.com/docs --delete --acl public-read
mv rss.xml ./build/blog-post/rss.xml
aws s3 sync ./build s3://docs-s3.ngrok.com/docs --delete --acl public-read