add binary buildpack #63
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 & Deploy | |
on: | |
push: | |
branches: | |
- master | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
name: Build release binary | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Git repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18.15.0 | |
- name: Install dependencies and build frontend | |
run: npm ci && npm run build | |
- name: Build backend | |
run: cargo build --release | |
- name: Prepare deployment assets | |
run: | | |
mkdir app | |
mv ./target/release/mywebsite ./app/app | |
mv ./dist ./app/dist | |
mv ./docs ./app/docs | |
mv Procfile ./app/Procfile | |
deploy: | |
name: Deploy to Heroku | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Git repository | |
uses: actions/checkout@v3 | |
- name: testing step | |
run: ls | |
- uses: akhileshns/heroku-deploy@v3.13.15 | |
with: | |
heroku_api_key: ${{secrets.HEROKU_API_KEY}} | |
heroku_app_name: "k27dong-website" | |
heroku_email: "me@kefan.me" | |
appdir: "./app" | |
buildpack: "https://github.com/ph3nx/heroku-binary-buildpack.git" |