-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from NxtLvLSoftware/dev-to-dist
Merge dev changes to dist
- Loading branch information
Showing
8 changed files
with
184 additions
and
75 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [dev, dist] | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
GITHUB_ACTIONS: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
node-version: [18] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Cache node_modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}}-${{ matrix.node-version }}-node_modules-${{ hashFiles('package.json') }} | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build alpine-typescript | ||
run: npm run build-ci | ||
|
||
stage: | ||
name: Stage changes as pull request | ||
needs: [test] | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
node-version: [18] | ||
|
||
if: github.ref == 'refs/heads/dev' | ||
steps: | ||
- run: 'echo "Staging dev changes"' | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: dist | ||
|
||
- name: Reset branch | ||
run: | | ||
git fetch origin dev:dev | ||
git reset --hard dev | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Cache node_modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}}-${{ matrix.node-version }}-node_modules-${{ hashFiles('package.json') }} | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build alpine-typescript | ||
run: npm run build-ci | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
token: ${{ secrets.STAGE_DEPLOY_KEY }} | ||
title: Merge dev changes to dist | ||
branch: dev-to-dist | ||
assignees: JackNoordhuis |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Publish Pages | ||
|
||
on: | ||
push: | ||
branches: [dist] | ||
|
||
permissions: | ||
contents: write | ||
|
||
env: | ||
GITHUB_ACTIONS: true | ||
|
||
jobs: | ||
build: | ||
name: Generate site | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
node-version: [18] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Cache node_modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}}-${{ matrix.node-version }}-node_modules-${{ hashFiles('package.json') }} | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build alpine-typescript | ||
run: npm run docs-ci | ||
|
||
- name: Fix permissions | ||
run: | | ||
chmod -c -R +rX "./docs-build" | while read line; do | ||
echo "::warning title=Invalid file permissions automatically fixed::$line" | ||
done | ||
- uses: actions/upload-pages-artifact@v2 | ||
with: | ||
name: github-pages | ||
path: ./docs-build | ||
|
||
publish: | ||
name: Publish | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
permissions: | ||
pages: write | ||
id-token: write | ||
|
||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"navigationLinks": { | ||
"GitHub": "https://github.com/NxtLvlSoftware/alpine-typescript", | ||
"Twitter": "https://twitter.com/NxtLvlSoftware" | ||
}, | ||
"sidebarLinks": { | ||
"GitHub": "https://github.com/NxtLvlSoftware/alpine-typescript", | ||
"Twitter": "https://twitter.com/NxtLvlSoftware", | ||
"Home": "/index.html" | ||
} | ||
} |