Skip to content

Commit

Permalink
chore: Add GitHub Actions workflow for deploying static content to Pa…
Browse files Browse the repository at this point in the history
…ges and update Node version
  • Loading branch information
deblanco committed Aug 5, 2024
1 parent 8e680b0 commit 5f43522
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 2 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
packages: read
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./app/
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
registry-url: "https://npm.pkg.github.com"
- name: Install dependencies
run: yarn
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: yarn build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload dist repository
path: "./dist"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
4 changes: 2 additions & 2 deletions app/src/Pages/Main/Components/Box3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import { TokenABI } from "../../../lib/ABI/Token";
export const Box3 = () => {
const { address } = useAccount();
const [amount0, setAmount0] = useState("1000");
const [from, setFrom] = useState<Address>(tokenAddressMap["stbleUSD"]);
const [to, setTo] = useState<Address>(tokenAddressMap["Bitcoin"]);
const [from] = useState<Address>(tokenAddressMap["stbleUSD"]);
const [to] = useState<Address>(tokenAddressMap["Bitcoin"]);
const { swap, approve } = useSwap();
const toast = useToast();
const { connect, connectors } = useConnect();
Expand Down

0 comments on commit 5f43522

Please sign in to comment.