Skip to content

Update main.yml

Update main.yml #71

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Replace server IP in JavaScript
run: |
sed -i 's|const serverip = "localhost";|const serverip = "${{ secrets.IP_FOR_SERVER }}";|g' webUI/resource-pack-page.js
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: ./webUI
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}