Skip to content

update deploy to use next #5

update deploy to use next

update deploy to use next #5

Workflow file for this run

name: Deploy
on:
push:
branches:
- 'test'
jobs:
deploy:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Set up s3cmd
run: |
python -m pip install --upgrade pip
pip install s3cmd
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '18'
- uses: actions/cache/restore@v4
with:
path: node_modules
key: ${{ runner.os }}-${ env.NODE_VERSION }}-node-${ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- uses: actions/cache/save@v4
with:
path: node_modules
key: ${{ runner.os }}-${ env.NODE_VERSION }}-node-${ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm run build
- name: sync folder with cdn
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CDN_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CDN_SECRET_ACCESS_KEY }}
run: |
s3cmd -c ./do/.s3cfg sync --acl-public ./out/ --delete-removed s3://api-docs-test --no-preserve --no-mime-magic --guess-mime-type -v
- name: purge cdn cache
run: |
doctl compute cdn flush ad8cf717-75a6-4994-870c-03148b36af2f