Build and deploy the website
This commit is contained in:
2
.github/workflows/build-preview.yml
vendored
2
.github/workflows/build-preview.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
||||
with:
|
||||
node-version: '16'
|
||||
- run: npm ci
|
||||
- run: npm run build-site
|
||||
- run: ./tasks/build-website.sh -v dev -l dev
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: site
|
||||
|
||||
37
.github/workflows/deploy.yml
vendored
Normal file
37
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
concurrency:
|
||||
group: "deploy"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18'
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Build Website
|
||||
run: ./tasks/build-website.sh -l $(node tasks/get-latest-release.js)
|
||||
- name: Check out openlayers.github.io
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: openlayers/openlayers.github.io
|
||||
ssh-key: ${{ secrets.OPENLAYERS_GITHUB_IO_KEY }}
|
||||
path: openlayers.github.io
|
||||
- run: |
|
||||
cp -r build/site/* openlayers.github.io/dist/
|
||||
cd openlayers.github.io
|
||||
git config user.name "$(git --no-pager log --format=format:'%an' -n 1)"
|
||||
git config user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
|
||||
git add .
|
||||
git commit -m "Website updates"
|
||||
git push origin main
|
||||
Reference in New Issue
Block a user