-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: website generation and deployment
add distribution and source downloads to the website migrate to Github Actions
- Loading branch information
1 parent
1314b85
commit 6ba8ce0
Showing
9 changed files
with
104 additions
and
86 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,37 @@ | ||
name: Deploy Demo | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: [12] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Nodejs ${{ matrix.node }} | ||
uses: actions/setup-node@v1 | ||
- name: Install dependencies | ||
env: | ||
CI: true | ||
run: npm install | ||
- name: Build the plugin | ||
run: npm run build | ||
- name: Deploy the plugin | ||
if: success() | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
FORMBUILDER_WEBSITE_DIR: ${{ secrets.FORMBUILDER_WEBSITE_DIR }} | ||
FORMBUILDER_WEBSITE_REPO: ${{ secrets.FORMBUILDER_WEBSITE_REPO }} | ||
run: | | ||
echo "https://${{ secrets.GH_TOKEN }}:@github.com" > .git/credentials | ||
git config --global credential.helper "store --file=.git/credentials" | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "Kevin Chappell" | ||
git clone --depth 1 ${{ secrets.FORMBUILDER_WEBSITE_REPO }} ${{ secrets.FORMBUILDER_WEBSITE_DIR }} 2> /dev/null | ||
npm run deploy:all |
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,32 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: [12] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Nodejs ${{ matrix.node }} | ||
uses: actions/setup-node@v1 | ||
- name: Install dependencies | ||
env: | ||
CI: true | ||
run: npm install | ||
- name: Build the plugin | ||
run: npm run build | ||
- name: Publish the plugin | ||
if: success() | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
FORMBUILDER_WEBSITE_DIR: ${{ secrets.FORMBUILDER_WEBSITE_DIR }} | ||
FORMBUILDER_WEBSITE_REPO: ${{ secrets.FORMBUILDER_WEBSITE_REPO }} | ||
run: npx semantic-release |
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,15 @@ | ||
const { exec } = require('child_process') | ||
const pkg = require('../package.json') | ||
|
||
const commands = [ | ||
'git add --all', | ||
`git commit -am "${pkg.version}"`, | ||
'git push origin $(git subtree split --prefix demo $(git rev-parse --abbrev-ref HEAD)):gh-pages --force', | ||
] | ||
|
||
// try to deploy the demo | ||
try { | ||
exec(commands.join(' && '), err => !err && console.log('Demo successfully deployed')) | ||
} catch (e) { | ||
console.error(e) | ||
} |
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,16 @@ | ||
const { exec } = require('child_process') | ||
const pkg = require('../package.json') | ||
|
||
const commands = [ | ||
`npm version ${pkg.version}`, | ||
'git push origin master', | ||
] | ||
|
||
const cwd = process.env.FORMBUILDER_WEBSITE_DIR || 'site' | ||
|
||
// try to deploy the demo | ||
try { | ||
exec(commands.join(' && '), { cwd }, err => !err && console.log('Site successfully deployed')) | ||
} catch (e) { | ||
console.error(e) | ||
} |
This file was deleted.
Oops, something went wrong.