Move to Pages action

pull/39/head
Melissa LeBlanc-Williams 4 years ago
parent e0a6974641
commit 24c08a698b

@ -1,9 +0,0 @@
categories:
- title: "⬆️ Dependencies"
collapse-after: 1
labels:
- "dependencies"
template: |
## What's Changed
$CHANGES

@ -21,21 +21,37 @@ concurrency:
cancel-in-progress: true
jobs:
# Single deploy job since we're just deploying
deploy:
name: Build from Source and Deploy
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v3
- name: install node v16
uses: actions/setup-node@v1
with:
node-version: 16
- name: Install Yarn with NPM
run: npm install -g yarn
- name: yarn install
run: yarn install
- name: Compile TypeScript
run: |
set -e
rm -rf dist
NODE_ENV=production npm exec -- tsc
NODE_ENV=production npm exec -- rollup -c
- name: Rename build artifact
run: |
mkdir js/modules
mv dist/web/index.js js/modules/esptool.js
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment

@ -1,45 +0,0 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: TypeScript Compile Package
on:
release:
types: [published]
jobs:
tsc:
name: Build from Source
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install node v16
uses: actions/setup-node@v1
with:
node-version: 16
- name: Install Yarn with NPM
run: npm install -g yarn
- name: yarn install
run: yarn install
- name: Compile TypeScript
run: |
set -e
rm -rf dist
NODE_ENV=production npm exec -- tsc
NODE_ENV=production npm exec -- rollup -c
- name: Rename build artifact
run: mv dist/web/index.js esptool.js
- name: Upload Assets to the GitHub Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: esptool.js
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: esptool.js
asset_name: esp_tool.js
tag: ${{ github.ref }}
overwrite: true
body: "This is my release text"

@ -40,7 +40,7 @@
window.location.hostname === "localhost"
? "/dist/web/index.js"
: "https://unpkg.com/esp-web-flasher@5.1.4/dist/web/index.js?module"
//"https://cdn.jsdelivr.net/gh/adafruit/Adafruit_WebSerial_ESPTool@5.2.0/diest/web/index.js"
//"https://cdn.jsdelivr.net/gh/adafruit/Adafruit_WebSerial_ESPTool@5.2.0/dist/web/index.js"
);
</script>
<script src="js/script.js" module defer></script>

Loading…
Cancel
Save