Official Introduction
Deploy Certificate to Aliyun
Automatically deploy wildcard SSL certificates to Alibaba Cloud CDN every two months.
Features
Automatically renew Let’s Encrypt wildcard domain certificates
Automatically deploy to Alibaba Cloud CDN
Runs automatically once every two months
Email notification when certificate is about to expire
Secure sensitive information using GitHub Secrets
How to Use
Step 1: Fork the Repository
- Open the project’s GitHub page
- Click the “Fork” button at the top right corner
- This will create a full copy under your GitHub account
Step 2: Configure Alibaba Cloud Access Key (AK/SK)
To allow the GitHub script to access your Alibaba Cloud account, you need to provide an AccessKey with appropriate permissions.
- Log in to the Alibaba Cloud Console and go to the Resource Access Management (RAM) page
- Create a dedicated user for this project (recommended for security best practices)
- Assign the following policies to the user:
AliyunDNSFullAccess(Manage DNS resolution, used for automatic domain ownership verification)AliyunCDNFullAccess(Manage CDN, used to upload and deploy certificates)AliyunYundunCertFullAccess(Manage SSL Certificates Service)
- Create an AccessKey (AK/SK) for this user and securely save it
Step 3: Set Secrets in Your GitHub Repository
- Go to the page of your forked repository
- Click the “Settings” tab at the top
- In the left sidebar, navigate to “Secrets and variables” → “Actions”
- Click “New repository secret” and add the following secrets one by one:
| Secret Name | Description | Example Value |
|---|---|---|
ALIYUN_ACCESS_KEY_ID |
Alibaba Cloud AccessKey ID | LTAI5txxxxxxxxxxxxx |
ALIYUN_ACCESS_KEY_SECRET |
Alibaba Cloud AccessKey Secret | h6J9Zxxxxxxxxxxxxxxxxxxxx |
DOMAINS |
Main domains, multiple separated by English commas | example.com,test.org |
ALIYUN_CDN_DOMAINS |
CDN domains, corresponding in order to DOMAINS, multiple separated by English commas | cdn.example.com,img.test.org |
EMAIL |
Email address to receive notifications | your-email@example.com |
Step 4: Trigger Workflow Execution
- In your forked repository, click the “Code” tab
- Find any file (e.g.,
README.md) and click the edit button (pencil icon) - Make a trivial change, such as adding a space or newline at the end
- Enter a commit message (e.g.,
Trigger first run) and click “Commit changes”
Step 5: Check Execution Results
- After committing, click the “Actions” tab at the top of the repository
- View the workflow run status and detailed logs
- If all configurations are correct, the workflow will show a green checkmark (
), indicating success - Log in to the Alibaba Cloud CDN Console to verify that the certificate has been updated
Important Notes
- Security: Alibaba Cloud AK/SK credentials are highly sensitive. Always configure them via Secrets, never hardcode them in files
- Domain Mapping: The order of domains in
DOMAINSandALIYUN_CDN_DOMAINSmust exactly match; otherwise, certificates may be deployed to incorrect CDN domains - Delimiter: Separate multiple domains with English commas only, without spaces or other characters
- First Run: It is recommended to manually trigger the workflow once to ensure everything is configured correctly
- Costs: Let’s Encrypt certificates are free, but associated Alibaba Cloud services (CDN, DNS, etc.) may incur standard usage fees
Support
If you encounter issues, please:
- Check error messages in the GitHub Actions logs
- Ensure all secrets are correctly set
- Confirm the RAM user has the required permissions
That’s it! You’ve completed all setup steps. From now on, GitHub will automatically renew and deploy your certificates approximately every 60 days — a one-time setup for long-term convenience.