This repository has been archived by the owner on Feb 19, 2024. It is now read-only.
Uses dev env #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build dev GitHub Pages site from feature branch | |
on: | |
push: | |
branches: | |
- "mxskylar_dev_deploy" | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Make dev directory | |
shell: bash | |
run: "PROJECT=\"$(basename $(pwd))\"; cd ..; mkdir _tmp; cp -r $PROJECT/* _tmp; mkdir -p $PROJECT/_dev; mv _tmp/* $PROJECT/_dev; rm -rf _tmp" | |
- name: ls | |
shell: bash | |
run: "ls -la _dev" | |
- name: Build | |
uses: actions/jekyll-build-pages@v1 | |
with: | |
destination: "./_dev" | |
- name: ls | |
shell: bash | |
run: "ls -la _dev" | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: "./_dev" | |
- name: ls | |
shell: bash | |
run: "ls -la _dev" | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 | |
environment: | |
name: github-pages-dev | |
url: "${{ steps.deployment.outputs.page_url }}/_dev" |