Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
juanpflores authored Mar 15, 2023
0 parents commit d95183d
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# -------------------------------------------------------------------------------------------------
# This workflow is meant to be copied to the preview repo, in order to handle the actual GitHub
# Pages deployment, along with any other accessory operation, like commenting on a PR.
# Source: https://github.com/EndBug/pages-preview
# -------------------------------------------------------------------------------------------------

name: Deploy previews and comment on PR
on:
workflow_dispatch:
inputs:
ref:
description: 'The ref to deploy'
required: true
type: string
version:
description: 'The version of EndBug/pages-preview that triggered the workflow'
required: true
type: string


permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# VERSION: update before changing the major version
version-check:
name: Check action version
runs-on: ubuntu-latest
steps:
- run: |
if [ "${{ github.event.inputs.version }}" != "v1" ]; then
echo "This workflow is meant to be used with EndBug/pages-preview@v1, please update your action."
exit 1
fi
deploy:
name: Deploy previews to GitHub Pages
runs-on: ubuntu-latest
needs: version-check

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.ref }}
- uses: actions/configure-pages@v2
- uses: actions/upload-pages-artifact@v1
with:
path: '.'
- id: deployment
uses: actions/deploy-pages@v1
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Preview repo template for [`EndBug/pages-preview`](https://github.com/EndBug/pages-preview)

To create your own preview repo, click the "Use this template" button at the top of the page.
**IMPORTANT**: make sure to tick the "Include all branches" checkbox.

For info on how to finish the setup, check out [the action's README](https://github.com/EndBug/pages-preview#setup).

0 comments on commit d95183d

Please sign in to comment.