Github workflow
Create a workflow
Create a workflow script in Github to automate deployments.
Add your site to ServerWand if you haven't already done so.
Then generate a deployment URL from the App tab and copy the URL.
Go to your repostory in Github, then settings -> Secrets and variables -> Actions -> New repository secret
.Give it the name DEPLOY_URL
The secret is the Deployment URL we copied previously:
We now need to create our build script.
Place the build.yml file in: .github/workflows/build.yml
Once synced our Github repo should now have a workflow ready to be run:
In order to run the workflow we must push another commit to our repository. Any commit will do.
This should trigger the workflow:
If all is successful we will have a new build pushed to our website and any updates will also trigger a new build.
Redirect all traffic to the index.html
We may want to route all website urls to our apps index page otherwise the subpages will generate a 404 error upon refresh.
We can do this by uploading a htaccess file to the website directory. We should put it above the public folder so it is not overwritten by the new builds.
Navigate to the website folder in ServerWand
Upload this htaccess file.