Use this action to trigger a restart (recycle) of an IIS website on a server that supports Web Deploy.
It's using Microsoft’s own Web Deploy 3.0+ executable.
Create a /.github/workflows/main.yml file and paste this in:
name: Restart Web Server
on:
workflow_dispatch:
jobs:
recycle:
name: Recycle IIS AppPool
runs-on: windows-latest
steps:
- uses: frontendsupport/recycle-apppool
with:
website-name: ${{ secrets.WEBSITE_NAME }}
server-computer-name: ${{ secrets.SERVER_COMPUTER_NAME }}
server-username: ${{ secrets.SERVER_USERNAME }}
server-password: ${{ secrets.SERVER_PASSWORD }}- Locate the repository you want to allow triggering a restart in
- Select the
Actionstab - Select
Set up a workflow yourself - Copy paste the sample workflow into your workflow file and commit the file
- The workflow takes advantage of
Secrets, so you'll need to have added the required secrets to your repository - Your new workflow should now be available on the
Actionstab
These settings are all required, and should be added to your Secrets.
(To add a secret to your repository, go to the Settings tab, then to Secrets.
Here you can add your secrets and subsequently reference them in your .yml file.)
| Setting | Example | Description |
|---|---|---|
website-name |
web.site.com |
IIS Web Site to recycle |
server-computer-name |
https://web.site.com.webserver.com:8172 |
Web Deploy URL (note: Include the port) |
server-username |
username |
Server/FTP username |
server-password |
password |
Server/FTP password |
This action was created by modifying code from Rasmus Buchholdt's Simply Web Deploy action.