-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (50 loc) · 1.62 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
on: [push, workflow_dispatch]
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Deploy to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set environment variable
run: |
if [ ${{ github.ref }} = 'refs/heads/read-prod' ]; then
echo "PUBLIC_WACS_URL=https://content.bibletranslationtools.org" >> $GITHUB_ENV
else
echo "PUBLIC_WACS_URL=https://wacs-dev.bibletranslationtools.org" >> $GITHUB_ENV
fi
# Run your project's build step
# - name: Build
# run: npm install && npm run build
- name: get pnpm
uses: pnpm/action-setup@v2
with:
version: 7.23.0
- name: setup node
uses: actions/setup-node@v3
with:
node-version: "18"
cache: pnpm
- name: Upgrade JS dependencies
# ADD YOUR CUSTOM DEPENDENCY UPGRADE COMMANDS BELOW
uses: actions/setup-node@v3
with:
node-version: "18"
cache: pnpm
- name: Install JS dependencies and build
# ADD YOUR CUSTOM DEPENDENCY UPGRADE COMMANDS BELOW
run: |
pnpm install && pnpm build
env:
PUBLIC_WACS_URL: ${{ env.PUBLIC_WACS_URL }}
- name: Publish
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: read-bibleineverylanguage-org
directory: dist # e.g. 'dist'
gitHubToken: ${{ secrets.GITHUB_TOKEN }}